package com.itheima.mall.web.oms;

import com.itheima.mall.pojo.oms.OmsCompanyAddress;

import com.itheima.mall.service.oms.CompanyAddressService;
import com.itheima.mall.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("companyAddress")
public class CompanyAddressController {
    @Autowired
    private CompanyAddressService companyAddressService;

/*
*
     * 获取所有收货地址
     * @return

*/


    @GetMapping("list")
    public R listAll(){
        List<OmsCompanyAddress> omsCompanyAddressList = companyAddressService.listAll();
        return R.succeed(omsCompanyAddressList,null);
    }

}
